import {createMachine} from "xstate";
import {bill_card_config} from "./bill_card_machine.js";

export const bill_type_machine = createMachine(
  {
    id: "bill_type",
    initial: "已收起",
    states: {
      已收起: {
        on: {
          展开: {
            target: "已展开",
          },
        },
      },
      已展开: {
        ...bill_card_config,
        on: {
          收起: {
            target: "已收起",
          },
        }
      },
    },
  },
  {
    actions: {},
    actors: {},
    guards: {},
    delays: {},
  },
);